package com.zkthink.ceres.finance.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zkthink.base.R;
import com.zkthink.base.request.PageParams;
import com.zkthink.base.service.SuperService;
import com.zkthink.ceres.finance.dto.DepositJournalDTO;
import com.zkthink.ceres.finance.dto.DepositJournalPageDTO;
import com.zkthink.ceres.finance.dto.DepositJournalSaveDTO;
import com.zkthink.ceres.finance.dto.DepositSummaryDTO;
import com.zkthink.ceres.finance.entity.DepositJournal;

/**
 * <p>
 * 业务接口
 * 
 * </p>
 *
 * @author vivi.huang
 * @date 2020-06-26
 */
public interface DepositJournalService extends SuperService<DepositJournal> {

    /**
     * 保证金交流流水分页
     * @param params
     * @return
     */
    R<IPage<DepositJournalDTO>> findDepositJournalPage(PageParams<DepositJournalPageDTO> params);

    /**
     * 保证金总金额
     * @return
     */
    R<DepositSummaryDTO> getDepositSummary();

    /**
     * 更新流水退回状态
     * @param transactionId
     * @return
     */
    boolean updateRefundState(String transactionId);

    /**
     * 创建保证金流水
     * @param depositJournal
     * @param tenantCode
     * @return
     */
    boolean saveDepositJournal(DepositJournalSaveDTO depositJournal);
}
